package cn.edu.xmu.oomall.wechatpay.mapper.generator;

import cn.edu.xmu.oomall.wechatpay.mapper.generator.po.DivRefundTransPo;
import cn.edu.xmu.oomall.wechatpay.mapper.generator.po.DivRefundTransPoExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectKey;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface DivRefundTransPoMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wechatpay_div_refund_trans
     *
     * @mbg.generated
     */
    @Delete({
        "delete from wechatpay_div_refund_trans",
        "where `id` = #{id,jdbcType=BIGINT}"
    })
    int deleteByPrimaryKey(Long id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wechatpay_div_refund_trans
     *
     * @mbg.generated
     */
    @Insert({
        "insert into wechatpay_div_refund_trans (`id`, `sub_mchid`, ",
        "`order_id`, `out_order_no`, ",
        "`out_return_no`, `return_mchid`, ",
        "`amount`, `description`, ",
        "`result`, `create_time`, ",
        "`finish_time`)",
        "values (#{id,jdbcType=BIGINT}, #{subMchid,jdbcType=VARCHAR}, ",
        "#{orderId,jdbcType=VARCHAR}, #{outOrderNo,jdbcType=VARCHAR}, ",
        "#{outReturnNo,jdbcType=VARCHAR}, #{returnMchid,jdbcType=VARCHAR}, ",
        "#{amount,jdbcType=INTEGER}, #{description,jdbcType=VARCHAR}, ",
        "#{result,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, ",
        "#{finishTime,jdbcType=TIMESTAMP})"
    })
    @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="returnId", before=false, resultType=String.class)
    int insert(DivRefundTransPo row);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wechatpay_div_refund_trans
     *
     * @mbg.generated
     */
    @InsertProvider(type=DivRefundTransPoSqlProvider.class, method="insertSelective")
    @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="returnId", before=false, resultType=String.class)
    int insertSelective(DivRefundTransPo row);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wechatpay_div_refund_trans
     *
     * @mbg.generated
     */
    @SelectProvider(type=DivRefundTransPoSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="sub_mchid", property="subMchid", jdbcType=JdbcType.VARCHAR),
        @Result(column="order_id", property="orderId", jdbcType=JdbcType.VARCHAR),
        @Result(column="out_order_no", property="outOrderNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="out_return_no", property="outReturnNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="return_mchid", property="returnMchid", jdbcType=JdbcType.VARCHAR),
        @Result(column="amount", property="amount", jdbcType=JdbcType.INTEGER),
        @Result(column="description", property="description", jdbcType=JdbcType.VARCHAR),
        @Result(column="return_id", property="returnId", jdbcType=JdbcType.VARCHAR),
        @Result(column="result", property="result", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="finish_time", property="finishTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<DivRefundTransPo> selectByExample(DivRefundTransPoExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wechatpay_div_refund_trans
     *
     * @mbg.generated
     */
    @Select({
        "select",
        "`id`, `sub_mchid`, `order_id`, `out_order_no`, `out_return_no`, `return_mchid`, ",
        "`amount`, `description`, `return_id`, `result`, `create_time`, `finish_time`",
        "from wechatpay_div_refund_trans",
        "where `id` = #{id,jdbcType=BIGINT}"
    })
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="sub_mchid", property="subMchid", jdbcType=JdbcType.VARCHAR),
        @Result(column="order_id", property="orderId", jdbcType=JdbcType.VARCHAR),
        @Result(column="out_order_no", property="outOrderNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="out_return_no", property="outReturnNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="return_mchid", property="returnMchid", jdbcType=JdbcType.VARCHAR),
        @Result(column="amount", property="amount", jdbcType=JdbcType.INTEGER),
        @Result(column="description", property="description", jdbcType=JdbcType.VARCHAR),
        @Result(column="return_id", property="returnId", jdbcType=JdbcType.VARCHAR),
        @Result(column="result", property="result", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="finish_time", property="finishTime", jdbcType=JdbcType.TIMESTAMP)
    })
    DivRefundTransPo selectByPrimaryKey(Long id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wechatpay_div_refund_trans
     *
     * @mbg.generated
     */
    @UpdateProvider(type=DivRefundTransPoSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("row") DivRefundTransPo row, @Param("example") DivRefundTransPoExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wechatpay_div_refund_trans
     *
     * @mbg.generated
     */
    @UpdateProvider(type=DivRefundTransPoSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("row") DivRefundTransPo row, @Param("example") DivRefundTransPoExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wechatpay_div_refund_trans
     *
     * @mbg.generated
     */
    @UpdateProvider(type=DivRefundTransPoSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(DivRefundTransPo row);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wechatpay_div_refund_trans
     *
     * @mbg.generated
     */
    @Update({
        "update wechatpay_div_refund_trans",
        "set `sub_mchid` = #{subMchid,jdbcType=VARCHAR},",
          "`order_id` = #{orderId,jdbcType=VARCHAR},",
          "`out_order_no` = #{outOrderNo,jdbcType=VARCHAR},",
          "`out_return_no` = #{outReturnNo,jdbcType=VARCHAR},",
          "`return_mchid` = #{returnMchid,jdbcType=VARCHAR},",
          "`amount` = #{amount,jdbcType=INTEGER},",
          "`description` = #{description,jdbcType=VARCHAR},",
          "`return_id` = #{returnId,jdbcType=VARCHAR},",
          "`result` = #{result,jdbcType=VARCHAR},",
          "`create_time` = #{createTime,jdbcType=TIMESTAMP},",
          "`finish_time` = #{finishTime,jdbcType=TIMESTAMP}",
        "where `id` = #{id,jdbcType=BIGINT}"
    })
    int updateByPrimaryKey(DivRefundTransPo row);
}